﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ThreeDPrinting.ORM;

namespace ThreeDPrinting.Pages.Profile
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Session["memberID"] == null)
            //    Response.Redirect("~/");
        }

        protected void cal_SelectionChanged(object sender, EventArgs e)
        {
            //send selected calender date to textbox
            txtDoB.Text = cal.SelectedDate.ToShortDateString();
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (DBEntities entities = new DBEntities())
            {
                ////Insert a Record
                ////===================================
                ////Create the member mem obect
                //tblmember mem = new tblmember();
                ////fill the object with data
                //mem.memberName = txtFirstName.Text + " " +  txtLastName.Text;
                //mem.memberBOD = cal.SelectedDate;
                ////Call the method to add the object to the table
                //entities.tblmembers.Add(mem);
                ////Save the changes to the DB
                //entities.SaveChanges();
                //Response.Write("<script>alert('Your profile has been added to database')</script>");
            }
        }
    }
}